home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2001 / MacHack 2001.toast / pc / The Hacks / King of Swing / JazzMIDI.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-23  |  997 b   |  33 lines

  1. //    Jazz and Blues Midi Composer
  2. //     Written by Joshua Paul and John Blatz
  3. //     MacHack 16, June 21, 2000
  4. //
  5. //    This little program, in its first incarnation, should write a jazzy MIDI file.
  6. //     The method we use for doing this is to choose some kind of pitch-only based line
  7. //     and dynamically create a syncopation for this line.  The final product is thus a 
  8. //     melody which varies itself in a reasonable way from the pitch line and has created
  9. //     a semi-random syncopation which fits the pitch line.
  10. //
  11. //    The hope is that we eventually add more instruments and more complexity, but only
  12. //     time will tell
  13.  
  14. #include <iostream.h>
  15. #include <stdlib.h>
  16. #include <fstream.h>
  17. #include "MusicClasses.h"
  18.  
  19. void makeSong(ofstream&, ifstream&);
  20.  
  21. int main() {
  22.     ofstream crap;
  23.     ifstream input;
  24.     
  25.     input.open("DeCSS.c", ios::binary);
  26.     crap.open("DeCSS.mid", ios::binary);
  27.     makeSong(crap, input);
  28. }
  29.  
  30. void makeSong(ofstream& fout, ifstream& fin) {
  31.     Song bullshitSong(fin);
  32.     bullshitSong.OutputToFile(fout);
  33. }